import { defineConfig } from 'vite'

import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    // 跨域代理
    proxy: {
        '/api': {
            target: 'http://nocat.life:4000',
            changeOrigin: true,
            rewrite: (path) => {
                return path.replace(/^\/api/, '')
            }
        }
    }
}

})
